#pragma once

#include <iostream>
#include <algorithm>

typedef long long int64;

struct Vector
{
	explicit Vector(size_t size = 0);
	Vector(const Vector&);
	Vector& operator=(const Vector&);
	size_t size() const;
	int64& operator[](size_t);
	int64 operator[](size_t) const;
	~Vector();
	void resize(size_t);

private:
	size_t len;
	size_t cap;
	union
	{
		int64 digit;
		int64 *digits;
	};
};
